package com.naiterui.ehp.bs.doctor.service;

import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.doctor.utils.AdTencentCloudSdkUtil;
import com.naiterui.ehp.bs.doctor.vo.TencentFaceIdVO;

import java.io.UnsupportedEncodingException;

/**
 * @author guoyongxiang
 * @date 2019/10/18 20:10
 * @since 1.0.0
 */
public interface ITencentDetectService {

    /**
     * SDK-初始化人脸识别参数
     *
     * @param doctorId
     * @return
     */
    TencentFaceIdVO getFaceId(Long doctorId) throws BusinessException;

    /**
     * SDK-H5初始化人脸识别参数
     *
     * @param userId
     * @param idNo
     * @param name
     * @return
     */
    TencentFaceIdVO getH5FaceId(String userId, String idNo, String name)
            throws BusinessException, UnsupportedEncodingException;
    
    /**
     * SDK-初始化人脸识别参数
     *
     * @param doctorId
     * @param idNo
     * @return
     */
    TencentFaceIdVO getFaceId(Long doctorId, String idNo) throws BusinessException;

    /**
     * SDK-查询人脸识别结果
     *
     * @param doctorId
     * @return
     */
    AdTencentCloudSdkUtil.FaceSyncVO getFaceSync(Long doctorId) throws BusinessException;

    /**
     * SDK-H5查询人脸识别结果
     *
     * @param doctorId
     * @return
     */
    AdTencentCloudSdkUtil.FaceSyncVO getH5FaceSync(Long doctorId) throws BusinessException;

    /**
     * 人脸识别结果回调
     *
     * @param code
     * @param orderNo
     * @param h5faceId
     * @param newSignature
     * @param liveRate
     * @return
     */
    String callbackH5Redirect(String code, String orderNo, String h5faceId, String newSignature, String liveRate);
}
